package com.nuc.bigdata.controller;

import com.nuc.bigdata.orm.entity.User;
import com.nuc.bigdata.service.SignUpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JackLuo
 * @date 2019/10/31
 */
@RestController
@RequestMapping("/oa-user")
public class SignUpController {

    private final SignUpService service;

    @Autowired
    public SignUpController(SignUpService service) {
        this.service = service;
    }


    @PostMapping("/user")
    public User signUp(@RequestBody User user) throws Exception {
        return service.signUp(user);
    }
}
